3.1.15 \(\int \frac {\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}{c-c \sin (e+f x)} \, dx\) [15]

3.1.15.1 Optimal result
3.1.15.2 Mathematica [A] (verified)
3.1.15.3 Rubi [A] (verified)
3.1.15.4 Maple [B] (warning: unable to verify)
3.1.15.5 Fricas [A] (verification not implemented)
3.1.15.6 Sympy [F]
3.1.15.7 Maxima [F]
3.1.15.8 Giac [F(-1)]
3.1.15.9 Mupad [F(-1)]

3.1.15.1 Optimal result

Integrand size = 40, antiderivative size = 103 \[ \int \frac {\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}{c-c \sin (e+f x)} \, dx=\frac {2 \sqrt {a} \sqrt {g} \arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}\right )}{c f}+\frac {2 \sec (e+f x) \sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}{c f} \]

output
2*arctan(cos(f*x+e)*a^(1/2)*g^(1/2)/(g*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^ 
(1/2))*a^(1/2)*g^(1/2)/c/f+2*sec(f*x+e)*(g*sin(f*x+e))^(1/2)*(a+a*sin(f*x+ 
e))^(1/2)/c/f
 
3.1.15.2 Mathematica [A] (verified)

Time = 2.59 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.88 \[ \int \frac {\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}{c-c \sin (e+f x)} \, dx=\frac {2 \sec (e+f x) \left (\arcsin \left (\sqrt {1-\sin (e+f x)}\right ) \sqrt {1-\sin (e+f x)}+\sqrt {\sin (e+f x)}\right ) \sqrt {g \sin (e+f x)} \sqrt {a (1+\sin (e+f x))}}{c f \sqrt {\sin (e+f x)}} \]

input
Integrate[(Sqrt[g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]])/(c - c*Sin[e + f 
*x]),x]
 
output
(2*Sec[e + f*x]*(ArcSin[Sqrt[1 - Sin[e + f*x]]]*Sqrt[1 - Sin[e + f*x]] + S 
qrt[Sin[e + f*x]])*Sqrt[g*Sin[e + f*x]]*Sqrt[a*(1 + Sin[e + f*x])])/(c*f*S 
qrt[Sin[e + f*x]])
 
3.1.15.3 Rubi [A] (verified)

Time = 0.85 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.175, Rules used = {3042, 3407, 3042, 3254, 218, 3409, 15}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}{c-c \sin (e+f x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}{c-c \sin (e+f x)}dx\)

\(\Big \downarrow \) 3407

\(\displaystyle g \int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))}dx-\frac {g \int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)}}dx}{c}\)

\(\Big \downarrow \) 3042

\(\displaystyle g \int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))}dx-\frac {g \int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)}}dx}{c}\)

\(\Big \downarrow \) 3254

\(\displaystyle \frac {2 a g \int \frac {1}{\frac {\cos (e+f x) \cot (e+f x) a^2}{\sin (e+f x) a+a}+a}d\frac {a \cos (e+f x)}{\sqrt {g \sin (e+f x)} \sqrt {\sin (e+f x) a+a}}}{c f}+g \int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))}dx\)

\(\Big \downarrow \) 218

\(\displaystyle g \int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))}dx+\frac {2 \sqrt {a} \sqrt {g} \arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}\right )}{c f}\)

\(\Big \downarrow \) 3409

\(\displaystyle \frac {2 \sqrt {a} \sqrt {g} \arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}\right )}{c f}-\frac {2 a g \int \frac {\sec (e+f x) (\sin (e+f x) a+a) \tan (e+f x)}{a^2 c}d\frac {a \cos (e+f x)}{\sqrt {g \sin (e+f x)} \sqrt {\sin (e+f x) a+a}}}{f}\)

\(\Big \downarrow \) 15

\(\displaystyle \frac {2 \sqrt {a} \sqrt {g} \arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}\right )}{c f}+\frac {2 \sec (e+f x) \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}{c f}\)

input
Int[(Sqrt[g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]])/(c - c*Sin[e + f*x]),x 
]
 
output
(2*Sqrt[a]*Sqrt[g]*ArcTan[(Sqrt[a]*Sqrt[g]*Cos[e + f*x])/(Sqrt[g*Sin[e + f 
*x]]*Sqrt[a + a*Sin[e + f*x]])])/(c*f) + (2*Sec[e + f*x]*Sqrt[g*Sin[e + f* 
x]]*Sqrt[a + a*Sin[e + f*x]])/(c*f)
 

3.1.15.3.1 Defintions of rubi rules used

rule 15
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ 
{a, m}, x] && NeQ[m, -1]
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3254
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(c_.) + (d_.)*sin[(e_.) 
 + (f_.)*(x_)]], x_Symbol] :> Simp[-2*(b/f)   Subst[Int[1/(b + d*x^2), x], 
x, b*(Cos[e + f*x]/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]]))], x 
] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] 
 && NeQ[c^2 - d^2, 0]
 

rule 3407
Int[(Sqrt[(g_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(a_) + (b_.)*sin[(e_.) + (f_. 
)*(x_)]])/((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[g/d   I 
nt[Sqrt[a + b*Sin[e + f*x]]/Sqrt[g*Sin[e + f*x]], x], x] - Simp[c*(g/d)   I 
nt[Sqrt[a + b*Sin[e + f*x]]/(Sqrt[g*Sin[e + f*x]]*(c + d*Sin[e + f*x])), x] 
, x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b*c - a*d, 0] && (EqQ[a^2 - 
b^2, 0] || EqQ[c^2 - d^2, 0])
 

rule 3409
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/(Sqrt[(g_.)*sin[(e_.) + (f_. 
)*(x_)]]*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[-2*(b/f 
)   Subst[Int[1/(b*c + a*d + c*g*x^2), x], x, b*(Cos[e + f*x]/(Sqrt[g*Sin[e 
 + f*x]]*Sqrt[a + b*Sin[e + f*x]]))], x] /; FreeQ[{a, b, c, d, e, f, g}, x] 
 && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0]
 
3.1.15.4 Maple [B] (warning: unable to verify)

Leaf count of result is larger than twice the leaf count of optimal. \(753\) vs. \(2(87)=174\).

Time = 3.21 (sec) , antiderivative size = 754, normalized size of antiderivative = 7.32

method result size
default \(-\frac {\sqrt {\frac {g \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )+1}}\, \left (\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )+1\right ) \sqrt {\frac {a \left (\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )+2 \csc \left (f x +e \right )-2 \cot \left (f x +e \right )+1\right )}{\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )+1}}\, \left (\sqrt {2}\, \ln \left (-\frac {\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \sqrt {2}+1}{\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \sqrt {2}-\csc \left (f x +e \right )+\cot \left (f x +e \right )-1}\right ) \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )+4 \sqrt {2}\, \arctan \left (\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \sqrt {2}+1\right ) \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )+4 \sqrt {2}\, \arctan \left (\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \sqrt {2}-1\right ) \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )+\sqrt {2}\, \ln \left (-\frac {\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \sqrt {2}-\csc \left (f x +e \right )+\cot \left (f x +e \right )-1}{\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \sqrt {2}+1}\right ) \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )-\sqrt {2}\, \ln \left (-\frac {\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \sqrt {2}+1}{\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \sqrt {2}-\csc \left (f x +e \right )+\cot \left (f x +e \right )-1}\right )-4 \sqrt {2}\, \arctan \left (\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \sqrt {2}+1\right )-4 \sqrt {2}\, \arctan \left (\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \sqrt {2}-1\right )-\sqrt {2}\, \ln \left (-\frac {\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \sqrt {2}-\csc \left (f x +e \right )+\cot \left (f x +e \right )-1}{\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \sqrt {2}+1}\right )+8 \sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\right ) \sqrt {2}}{4 c f \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right ) \sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \left (\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}+1\right ) \left (\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}-1\right )}\) \(754\)

input
int((g*sin(f*x+e))^(1/2)*(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e)),x,method= 
_RETURNVERBOSE)
 
output
-1/4/c/f*(g/((1-cos(f*x+e))^2*csc(f*x+e)^2+1)*(csc(f*x+e)-cot(f*x+e)))^(1/ 
2)*((1-cos(f*x+e))^2*csc(f*x+e)^2+1)*(a*((1-cos(f*x+e))^2*csc(f*x+e)^2+2*c 
sc(f*x+e)-2*cot(f*x+e)+1)/((1-cos(f*x+e))^2*csc(f*x+e)^2+1))^(1/2)/(-cot(f 
*x+e)+csc(f*x+e)+1)*(2^(1/2)*ln(-(csc(f*x+e)-cot(f*x+e)+(csc(f*x+e)-cot(f* 
x+e))^(1/2)*2^(1/2)+1)/((csc(f*x+e)-cot(f*x+e))^(1/2)*2^(1/2)-csc(f*x+e)+c 
ot(f*x+e)-1))*(csc(f*x+e)-cot(f*x+e))+4*2^(1/2)*arctan((csc(f*x+e)-cot(f*x 
+e))^(1/2)*2^(1/2)+1)*(csc(f*x+e)-cot(f*x+e))+4*2^(1/2)*arctan((csc(f*x+e) 
-cot(f*x+e))^(1/2)*2^(1/2)-1)*(csc(f*x+e)-cot(f*x+e))+2^(1/2)*ln(-((csc(f* 
x+e)-cot(f*x+e))^(1/2)*2^(1/2)-csc(f*x+e)+cot(f*x+e)-1)/(csc(f*x+e)-cot(f* 
x+e)+(csc(f*x+e)-cot(f*x+e))^(1/2)*2^(1/2)+1))*(csc(f*x+e)-cot(f*x+e))-2^( 
1/2)*ln(-(csc(f*x+e)-cot(f*x+e)+(csc(f*x+e)-cot(f*x+e))^(1/2)*2^(1/2)+1)/( 
(csc(f*x+e)-cot(f*x+e))^(1/2)*2^(1/2)-csc(f*x+e)+cot(f*x+e)-1))-4*2^(1/2)* 
arctan((csc(f*x+e)-cot(f*x+e))^(1/2)*2^(1/2)+1)-4*2^(1/2)*arctan((csc(f*x+ 
e)-cot(f*x+e))^(1/2)*2^(1/2)-1)-2^(1/2)*ln(-((csc(f*x+e)-cot(f*x+e))^(1/2) 
*2^(1/2)-csc(f*x+e)+cot(f*x+e)-1)/(csc(f*x+e)-cot(f*x+e)+(csc(f*x+e)-cot(f 
*x+e))^(1/2)*2^(1/2)+1))+8*(csc(f*x+e)-cot(f*x+e))^(1/2))/(csc(f*x+e)-cot( 
f*x+e))^(1/2)/((csc(f*x+e)-cot(f*x+e))^(1/2)+1)/((csc(f*x+e)-cot(f*x+e))^( 
1/2)-1)*2^(1/2)
 
3.1.15.5 Fricas [A] (verification not implemented)

Time = 0.41 (sec) , antiderivative size = 442, normalized size of antiderivative = 4.29 \[ \int \frac {\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}{c-c \sin (e+f x)} \, dx=\left [\frac {\sqrt {-a g} \cos \left (f x + e\right ) \log \left (\frac {128 \, a g \cos \left (f x + e\right )^{5} - 128 \, a g \cos \left (f x + e\right )^{4} - 416 \, a g \cos \left (f x + e\right )^{3} + 128 \, a g \cos \left (f x + e\right )^{2} + 289 \, a g \cos \left (f x + e\right ) + 8 \, {\left (16 \, \cos \left (f x + e\right )^{4} - 24 \, \cos \left (f x + e\right )^{3} - 66 \, \cos \left (f x + e\right )^{2} + {\left (16 \, \cos \left (f x + e\right )^{3} + 40 \, \cos \left (f x + e\right )^{2} - 26 \, \cos \left (f x + e\right ) - 51\right )} \sin \left (f x + e\right ) + 25 \, \cos \left (f x + e\right ) + 51\right )} \sqrt {-a g} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )} + a g + {\left (128 \, a g \cos \left (f x + e\right )^{4} + 256 \, a g \cos \left (f x + e\right )^{3} - 160 \, a g \cos \left (f x + e\right )^{2} - 288 \, a g \cos \left (f x + e\right ) + a g\right )} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1}\right ) + 8 \, \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )}}{4 \, c f \cos \left (f x + e\right )}, -\frac {\sqrt {a g} \arctan \left (\frac {\sqrt {a g} {\left (8 \, \cos \left (f x + e\right )^{2} + 8 \, \sin \left (f x + e\right ) - 9\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )}}{4 \, {\left (2 \, a g \cos \left (f x + e\right )^{3} + a g \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 2 \, a g \cos \left (f x + e\right )\right )}}\right ) \cos \left (f x + e\right ) - 4 \, \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )}}{2 \, c f \cos \left (f x + e\right )}\right ] \]

input
integrate((g*sin(f*x+e))^(1/2)*(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e)),x, 
algorithm="fricas")
 
output
[1/4*(sqrt(-a*g)*cos(f*x + e)*log((128*a*g*cos(f*x + e)^5 - 128*a*g*cos(f* 
x + e)^4 - 416*a*g*cos(f*x + e)^3 + 128*a*g*cos(f*x + e)^2 + 289*a*g*cos(f 
*x + e) + 8*(16*cos(f*x + e)^4 - 24*cos(f*x + e)^3 - 66*cos(f*x + e)^2 + ( 
16*cos(f*x + e)^3 + 40*cos(f*x + e)^2 - 26*cos(f*x + e) - 51)*sin(f*x + e) 
 + 25*cos(f*x + e) + 51)*sqrt(-a*g)*sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f* 
x + e)) + a*g + (128*a*g*cos(f*x + e)^4 + 256*a*g*cos(f*x + e)^3 - 160*a*g 
*cos(f*x + e)^2 - 288*a*g*cos(f*x + e) + a*g)*sin(f*x + e))/(cos(f*x + e) 
+ sin(f*x + e) + 1)) + 8*sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e)))/(c 
*f*cos(f*x + e)), -1/2*(sqrt(a*g)*arctan(1/4*sqrt(a*g)*(8*cos(f*x + e)^2 + 
 8*sin(f*x + e) - 9)*sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e))/(2*a*g* 
cos(f*x + e)^3 + a*g*cos(f*x + e)*sin(f*x + e) - 2*a*g*cos(f*x + e)))*cos( 
f*x + e) - 4*sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e)))/(c*f*cos(f*x + 
 e))]
 
3.1.15.6 Sympy [F]

\[ \int \frac {\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}{c-c \sin (e+f x)} \, dx=- \frac {\int \frac {\sqrt {g \sin {\left (e + f x \right )}} \sqrt {a \sin {\left (e + f x \right )} + a}}{\sin {\left (e + f x \right )} - 1}\, dx}{c} \]

input
integrate((g*sin(f*x+e))**(1/2)*(a+a*sin(f*x+e))**(1/2)/(c-c*sin(f*x+e)),x 
)
 
output
-Integral(sqrt(g*sin(e + f*x))*sqrt(a*sin(e + f*x) + a)/(sin(e + f*x) - 1) 
, x)/c
 
3.1.15.7 Maxima [F]

\[ \int \frac {\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}{c-c \sin (e+f x)} \, dx=\int { -\frac {\sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )}}{c \sin \left (f x + e\right ) - c} \,d x } \]

input
integrate((g*sin(f*x+e))^(1/2)*(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e)),x, 
algorithm="maxima")
 
output
-integrate(sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e))/(c*sin(f*x + e) - 
 c), x)
 
3.1.15.8 Giac [F(-1)]

Timed out. \[ \int \frac {\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}{c-c \sin (e+f x)} \, dx=\text {Timed out} \]

input
integrate((g*sin(f*x+e))^(1/2)*(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e)),x, 
algorithm="giac")
 
output
Timed out
 
3.1.15.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}{c-c \sin (e+f x)} \, dx=\int \frac {\sqrt {g\,\sin \left (e+f\,x\right )}\,\sqrt {a+a\,\sin \left (e+f\,x\right )}}{c-c\,\sin \left (e+f\,x\right )} \,d x \]

input
int(((g*sin(e + f*x))^(1/2)*(a + a*sin(e + f*x))^(1/2))/(c - c*sin(e + f*x 
)),x)
 
output
int(((g*sin(e + f*x))^(1/2)*(a + a*sin(e + f*x))^(1/2))/(c - c*sin(e + f*x 
)), x)